//
//  AddBlacklist.m
//  timelyRain
//
//  Created by Jiafei Wei on 16/9/29.
//  Copyright © 2016年 Jiafei Wei. All rights reserved.
//

#import "AddBlacklist.h"
#import "MBTPre.h"
@interface AddBlacklist()<UIGestureRecognizerDelegate>
@property (weak, nonatomic) IBOutlet UIView *addTag;
@property (weak, nonatomic) IBOutlet UIView *addContact;
@end
@implementation AddBlacklist
+ (instancetype)headerView
{
    AddBlacklist *footer = [[[NSBundle mainBundle] loadNibNamed:@"AddBlacklist" owner:nil options:nil] lastObject];
    CGRect frame = footer.frame;
    frame.size.width=SCREEN_W;
    frame.size.height=SCREEN_H;//重新设定
    footer.frame =frame;
    footer.content.layer.masksToBounds = YES;
    footer.content.layer.cornerRadius = 10;
    [footer AddTagGes];
    [footer AddContactGes];
    return footer;
}
-(void)AddTagGes{
        _addTag.userInteractionEnabled = YES;
        UITapGestureRecognizer *addTapGest = [[UITapGestureRecognizer alloc] init];
        addTapGest.numberOfTapsRequired = 1;
        addTapGest.delegate = self;
        [_addTag addGestureRecognizer:addTapGest];
        [addTapGest addTarget:self action:@selector(tagTapView:)];
}
- (void)tagTapView:(UITapGestureRecognizer *)addTapGest{
        self.tagBlock();
//    if([self.delegate respondsToSelector:@selector(addTagBack)]) {
//        [self.delegate addTagBack];
//    }
}
-(void)AddContactGes{
    _addContact.userInteractionEnabled = YES;
    UITapGestureRecognizer *addTapGest = [[UITapGestureRecognizer alloc] init];
    addTapGest.numberOfTapsRequired = 1;
    addTapGest.delegate = self;
    [_addContact addGestureRecognizer:addTapGest];
    [addTapGest addTarget:self action:@selector(contactTapView:)];
}
- (void)contactTapView:(UITapGestureRecognizer *)addTapGest{
    self.contactBlock();
}
@end
